package com.wiloon.javax.tmp.gc;

/*
 * Created by wiloon on 6/18/17;
 */

import java.util.HashMap;
import java.util.Map;
import java.util.UUID;

public class OOMTest {

    @SuppressWarnings("static-access")
    public static void main(String[] args) {
        Map<String, Object> map = new HashMap<>();

        for (int i = 0; i < 1000000; i++) {
            try {
                map.put(String.valueOf(i), UUID.randomUUID().toString());
                System.out.println("循环--" + new Integer(i));
                Thread.currentThread().sleep(1);//这里可以调整为500，50，10
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
